﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Async="true" EnableEventValidation="false"
CodeFile="MerchantManualQuote.aspx.cs" Inherits="carinsurance_merchant_MerchantManualQuote" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
    <link rel="stylesheet" type="text/css" href="../../OLD/css/styles2.css" title="Contemporary" />
    <link href="../../js/tabs/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet"
        type="text/css" />
    <script src="../../js/tabs/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="../../js/tabs/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <table width="100%" cellpadding="5">
        <tr>
            <td style="width: 800px">
                <h1>
                    <asp:Label runat="server" Text="Merchant Manual Quote" ID="lblPageName"></asp:Label>
                    
                    <asp:Label runat="server" Text="" ID="lblCallTypeDesc"></asp:Label></h1>
            </td>
            <td style="width: 200px">
                &nbsp;
            </td>
            <td style="text-align: right">
                <asp:Button runat="server" ID="btnCar" Text="Car Detail" Visible="true" OnClick="btnCar_Click"
                    Width="100px" Height="30px" Font-Bold="true" ValidationGroup="none" CausesValidation="false"
                    OnClientClick="return GoBackConfirm();" CssClass="blueB ml10" />
            </td>
            <td style="text-align: right">
                <asp:Button runat="server" ID="btnMerchant" Text="Merchant" Visible="true" OnClick="btnMerchant_Click"
                    Width="100px" Height="30px" Font-Bold="true" ValidationGroup="none" CausesValidation="false"
                    OnClientClick="return GoBackConfirm();" CssClass="blueB ml10" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="-1" ID="lblCallType" Visible="false"></asp:Label>
    <asp:Label runat="server" Text="0" ID="lblResetUrl" Visible="false" />
    <asp:Label runat="server" Text="-1" ID="lblAgentLeadID" Visible="false"></asp:Label>
    <asp:HiddenField ID="hidLastTab" Value="0" runat="server" />
    <div class="toggle" runat="server" id="divCarDetailList" visible="false">
        <div class="title opened" id="opened1">
            <img src="../../images/icons/dark/car.png" alt="" class="titleIcon" /><h6>
                <asp:Label runat="server" Text="Merchant Cars" ID="lblCarDetailListTitle" /></h6>
        </div>
        <div id="CDdetail">
            <asp:GridView ID="gvCarDetailList" runat="server" AutoGenerateColumns="False" CellPadding="4"
                Width="100%" GridLines="None" CssClass="sTable" DataKeyNames="CarId, CECarPolicyId, RefCEUserId"
                EmptyDataText="No item found." OnSelectedIndexChanged="gvCarDetailList_SelectedIndexChanged">
                <Columns>
                    <asp:BoundField DataField="CarId" HeaderText="CarId" HeaderStyle-Font-Bold="true"
                        HeaderStyle-ForeColor="Red" SortExpression="CarId" InsertVisible="False"
                        ReadOnly="True" Visible="true">
                        <ItemStyle Font-Bold="true" ForeColor="Red" BackColor="ActiveBorder" Width="80px"
                            HorizontalAlign="Center"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="CECarPolicyId" HeaderText="CECarPolicyId" SortExpression="CECarPolicyId"
                        InsertVisible="False" ReadOnly="True" Visible="true">
                        <ItemStyle Width="50px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="MakeModelDesc" HeaderText="<%$Resources:CarInsurance,CarMakeModel%>"
                        SortExpression="MakeModelDesc">
                        <ItemStyle Width="240px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="ManufactYear" HeaderText="<%$Resources:CarInsurance,CarModelYear%>"
                        SortExpression="ManufactYear">
                        <ItemStyle Width="60px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Insurance" HeaderText="<%$Resources:CarInsurance,InsuranceType%>"
                        SortExpression="Insurance">
                        <ItemStyle Width="30px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="CoverageCommenceDate" HeaderText="<%$Resources:CarInsurance,CoverCommencementDate%>"
                        SortExpression="CoverageCommenceDate" DataFormatString="{0:dd-MMM-yyyy}">
                        <ItemStyle Width="80px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="NCDPercent" HeaderText="<%$Resources:CarInsurance,NCB%>"
                        SortExpression="NCDPercent">
                        <ItemStyle Width="50px"></ItemStyle>
                    </asp:BoundField>
                    
                    <asp:BoundField DataField="QuoteDate" DataFormatString="{0:dd-MMM-yyyy hh:mm tt}"
                        HeaderText="<%$Resources:CarInsurance,QuoteDateTime%>" SortExpression="QuoteDate">
                        <ItemStyle></ItemStyle>
                    </asp:BoundField>
                    <asp:CommandField ShowSelectButton="True" ButtonType="Button" ItemStyle-Width="80px"
                        SelectText="<%$Resources:General,Select%>" ControlStyle-CssClass="blueB ml10" />
                </Columns>
                <FooterStyle />
                <PagerStyle />
                <SelectedRowStyle BackColor="ActiveBorder" Font-Bold="true" />
                <HeaderStyle />
                <EditRowStyle />
                <AlternatingRowStyle CssClass="gridodd" />
                <RowStyle CssClass="grideven" Height="30px" />
            </asp:GridView>
            <asp:SqlDataSource ID="sqlDsCarDetailList" runat="server" ConnectionString="<%$ ConnectionStrings:GG_MCDBConnectionString %>"
                SelectCommand="sprocMerchantCarAndPolicyDetailSelectItemList" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtCEId" Name="CompanyId" PropertyName="Text"
                        Type="Int64" />
                    <asp:ControlParameter ControlID="txtCarId" Name="CarId" DefaultValue="0"
                        PropertyName="Text" Type="Int64" />
                </SelectParameters>
            </asp:SqlDataSource>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="toggle" runat="server" id="divCustomerPolicyDetail" visible="false">
        <div class="title opened" id="opened2">
            <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" /><h6>
                <asp:Label ID="Label2" runat="server" Text="<%$Resources:CarInsurance,CustomerAndPolicy %>" />
            </h6>
        </div>
        <table cellpadding="0" cellspacing="0" width="100%" class="sTable">
            <thead>
                <tr>
                    <td colspan="3">
                        <b>
                            <%=GetGlobalResourceObject("CarInsurance", "CustomerDetail")%></b>
                    </td>
                    <td colspan="3">
                        <b>
                            <%=GetGlobalResourceObject("CarInsurance", "CarDetail")%></b>
                    </td>
                    <td colspan="6">
                        <b>
                            <%=GetGlobalResourceObject("CarInsurance", "PolicyDetail")%></b>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "FirstName")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblName" />
                    </td>
                    <!--Car Detaisl-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "CarModelYear")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblRegYear" />
                    </td>
                    <!--Policy Details-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "InsuranceType")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblInsuranceType" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "SumInsured")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblSumInsured" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "LastName")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" ForeColor="Red" runat="server" ID="lblLastName" />
                    </td>
                    <!--Car Detaisl-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "EmailAddress")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" ForeColor="Red" runat="server" ID="lblEmailAddress" />
                    </td>
                    <!--Policy Details-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "MobileNo")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" ForeColor="Red" runat="server" ID="lblMobileNo" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "CoverCommencementDate")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" ForeColor="Red" runat="server" ID="lblCoverCommencementDate" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "Gender")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblGender" />
                    </td>
                    <!--Car Detaisl-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "CarMakeModel")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblCarMakeModel" />
                    </td>
                    <!--Policy Details-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "CurrentInsurer")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td colspan="4">
                        <asp:Label Font-Bold="true" runat="server" ID="lblCurrentInsurer" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "Occupation") %>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblOccupation" />
                    </td>
                    <!--Car Detaisl-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "VehicleType") %>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblVehicleType" />
                    </td>
                    <!--Policy Details-->
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "NamedDriver") %>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblDriverCount" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "CTPL")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblCTPL" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "DOB")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblDOB" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "GarageType")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblGarageType" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "AnyClaimLastYear")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblClaimInfo" />
                    </td>
                    <td>
                        <%=GetGlobalResourceObject("CarInsurance", "NCB")%>
                    </td>
                    <td>
                        &nbsp;&nbsp; : &nbsp;
                    </td>
                    <td>
                        <asp:Label Font-Bold="true" runat="server" ID="lblNCD" />
                    </td>
                </tr>
                <tr>
                    <td colspan="12">
                        <span style="display: none;"><b>Ref.
                            <%=GetGlobalResourceObject("CarInsurance", "CarID")%>:</b><asp:Label ID="lblRefCarID"
                                runat="server" Font-Bold="true" ForeColor="Red" /><b><%=GetGlobalResourceObject("CarInsurance", "MobileNo")%>:</b><asp:Label
                                    ID="lblRefMobile" runat="server" Font-Bold="true" ForeColor="Red" /><b><%=GetGlobalResourceObject("CarInsurance", "EmailAddress")%>:</b><asp:Label
                                        ID="lblRefEmail" runat="server" Font-Bold="true" ForeColor="Red" /></span>
                        <b>
                            <%=GetGlobalResourceObject("CarInsurance", "QuoteDateTime")%>:</b><asp:Label ID="lblRefModifiedDateTime"
                                runat="server" Font-Bold="true" ForeColor="Red" />
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="clear">
        </div>
    </div>
    <div runat="server" id="divLinks" visible="false">
        <div class="body" id="newbtn">
            <asp:Label runat="server" ID="lblLastYearRefNo" />
            <asp:Label runat="server" ID="lblRenewalQuoteMessage" />
            <asp:Label runat="server" ID="lblRenewalStaus" Visible="false" Text="0" />
        </div>
    </div>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1" onclick="ontabclick('1');">Contact</a></li>
            <li><a href="#tabs-2" onclick="ontabclick('2');">Quote</a></li>
            <li><a href="#tabs-2" onclick="ontabclick('3');">Order</a></li>
        </ul>
        <div id="tabs-1" style="display: none">
            <div class="topdisplay pb10" visible="false">
                <div id="Div1" class="toggle" runat="server">
                    <div class="title opened" id="Div1">
                        <img src="../../images/icons/dark/call.png" alt="" class="titleIcon" /><h6>
                            <asp:Label ID="lblStartDayNameCaption" Font-Bold="true" runat="server" Text="<%$Resources:General,Started%>" />
                            at
                            <asp:Label runat="server" ID="lblStartDayName" Font-Bold="true" />
                            &nbsp;<asp:Label runat="server" ID="lblStartDateTime" Visible="true" ForeColor="Red"
                                Font-Bold="true" />
                            <asp:Label ID="lblCallDurationCaption" Font-Bold="true" runat="server" Text="<%$Resources:General,CallDuration%>" />
                            <span style="display: none;">M:<asp:TextBox runat="server" ID="txtMinute" Text="00"
                                Width="30px" />
                                S:<asp:TextBox runat="server" ID="txtSecond" Text="00" Width="30px" /></span>
                            <asp:Label runat="server" ID="lblCallDurationTimer" Font-Bold="true" Font-Size="Large" />
                        </h6>
                    </div>
                    <table width="100%" visible="false">
                        <tr>
                            <td>
                                <asp:Label runat="server" Text="Agent - Call" ID="lblCallSessionName" Font-Bold="true"
                                    Visible="false"></asp:Label>
                                <asp:Label ID="lblTESCO200" runat="server" Font-Bold="true" ForeColor="Green" Font-Size="Large" />
                            </td>
                        </tr>
                    </table>
                    <asp:Button runat="server" ID="btnGoBack" Text="<%$Resources:CarInsurance,Back%>"
                        Visible="false" OnClick="btnGoBack_Click" Width="121px" Height="30px" Font-Bold="true"
                        ValidationGroup="none" CausesValidation="false" OnClientClick="return GoBackConfirm();"
                        CssClass="blueB ml10" />
                </div>
                <asp:HyperLink runat="server" Visible="false" ID="lnkNewCarUsage" NavigateUrl="#"
                    Text="New"></asp:HyperLink>
            </div>
            <div class="nNote nFailure hideit" id="divBuyNowStatusMessage" runat="server">
                <p>
                    <asp:Label runat="server" ID="lblCommenceDateStatus" Visible="false" Text="0" />
                    <asp:Label runat="server" ID="lblCommenceDateStatusMessage" />
                    <asp:Label runat="server" ID="lblQuoteDateTimeStatus" Visible="false" Text="0" />
                    <asp:Label runat="server" ID="lblQuoteDateTimeStatusMessage" />
                    <asp:Label runat="server" ID="lblQuoteStatusMessage" /></p>
            </div>
            <div runat="server" id="divBuyNowStatus" visible="false">
                <asp:Label ID="lblBuyNowStatus" runat="server" Text="" Font-Size="Large" Font-Bold="true" />
                <asp:Button ID="btnBuyNowRefresh" Text="Refresh" runat="server" OnClick="btnBuyNowRefresh_Click" />
            </div>
          <%--<div id="div3" class="toggle" runat="server">
                <div class="title" id="Div4">
                    <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label ID="Label5" runat="server" Text="Quote List" />
                    </h6>
                </div>
                <div class="form">
                    <fieldset class="step">
                        <div class="formRow">
                            <asp:GridView ID="grvQuoteList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CellPadding="2" EmptyDataText="There are no data records to display." CssClass="sTable"
                                Width="100%" GridLines="None" DataSourceID="sqlDsQuoteList" 
                                DataKeyNames="BrokerPremiumId, CXBrokerProviderId, AgentId,QuoteRefNo">
                                <Columns>
                                    <asp:BoundField DataField="BrokerPremiumId" Visible="false" HeaderText="BrokerPremiumId"
                                        SortExpression="BrokerPremiumId" />
                                    <asp:BoundField DataField="ProviderCoverTypeId" Visible="false" HeaderText="ProviderCoverTypeId"
                                        SortExpression="ProviderCoverTypeId" />
                                    <asp:BoundField DataField="AgentName" HeaderText="<%$Resources:General,Broker%>"
                                        SortExpression="AgentName" />
                                    <asp:ImageField DataAlternateTextField="CompanyName" DataImageUrlField="LogoUrl"
                                        HeaderText="Logo">
                                    </asp:ImageField>
                                    <asp:BoundField DataField="CompanyName" HeaderText="<%$Resources:CarInsurance,CompanyName%>"
                                        SortExpression="CompanyName" Visible="false" />
                                    <asp:BoundField DataField="QuoteRefNo" HeaderText="<%$Resources:General,ReferenceNo%>"
                                        SortExpression="QuoteRefNo" ItemStyle-BackColor="ActiveBorder" ItemStyle-Font-Bold="true"
                                        ItemStyle-ForeColor="Red" ItemStyle-Font-Size="Medium">
                                        <ItemStyle BackColor="ActiveBorder" Font-Bold="True" Font-Size="Medium" ForeColor="Red" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ProviderCoverTypeDesc" HeaderText="<%$Resources:CarInsurance,InsuranceType%>"
                                        SortExpression="ProviderCoverTypeDesc" />
                                    <asp:BoundField DataField="Package" HeaderText="<%$Resources:General,PackageName%>"
                                        SortExpression="Package" Visible="false" />
                                    <asp:BoundField DataField="WorkShopDesc" HeaderText="<%$Resources:CarInsurance,GarageType%>"
                                        SortExpression="WorkShopDesc" />
                                    <asp:BoundField DataField="OwnDamage" DataFormatString="{0:#,0}" HeaderText="<%$Resources:CarInsurance,SumInsured%>"
                                        SortExpression="OwnDamage" />
                                    <asp:BoundField DataField="DiscountPercentage" Visible="true" HeaderText="Discount (%)"
                                        SortExpression="DiscountPercentage" />
                                    <asp:BoundField DataField="TotalCMI" DataFormatString="{0:#,0}" HeaderText="<%$Resources:CarInsurance,CTPL%>"
                                        SortExpression="TotalCMI" />
                                    <asp:BoundField DataField="Premium" DataFormatString="{0:#,0}" HeaderText="<%$Resources:General,PremiumAmount%>"
                                        SortExpression="Premium" />
                                    <asp:BoundField DataField="FloodCover" HeaderText="<%$Resources:CarInsuranceResultPage,FloodCover%>"
                                        SortExpression="FloodCover" />
                                    <asp:BoundField DataField="NameDriverStatus" HeaderText="<%$Resources:NonGG,NamedDrivers%>"
                                        SortExpression="NameDriverStatus" />
                                    <asp:BoundField DataField="SelectedStatus" HeaderText="<%$Resources:CarInsurance,SelectStatus%>"
                                        SortExpression="SelectedStatus" ItemStyle-Font-Bold="true">
                                        <ItemStyle Font-Bold="True" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CarId" HeaderText="CarId" SortExpression="CarId" />
                                    <asp:TemplateField HeaderText="Select">
                                        
                                        <ItemTemplate>
                                            <div>
                                                <asp:CheckBox runat="server" ID="chkSend" />
                                            </div>
                                            <div style="display: none;">
                                                <asp:Label ID="lblSendCarId" runat="server" ForeColor="White" Text='<%# Eval("CarId").ToString() %>'></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle />
                                <PagerStyle />
                                <SelectedRowStyle />
                                <HeaderStyle />
                                <EditRowStyle />
                                <AlternatingRowStyle />
                                <RowStyle />
                            </asp:GridView>
                            <asp:SqlDataSource ID="sqlDsQuoteList" runat="server" ConnectionString="<%$ ConnectionStrings:CX_CRMDBConnectionString %>"
                                SelectCommand="sprocMerchantBrokerPremiumSelectItemListByCustomerId" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="txtCEId" Name="CustomerId" DefaultValue="0"
                                        PropertyName="Text" Type="Int64" />
                                    <asp:Parameter Name="ProductType" DefaultValue="CIN" DbType="String" />
                                    <asp:ControlParameter ControlID="lblLangOption" Name="LangOption" DefaultValue="1"
                                        PropertyName="Text" Type="Int16" />
                                    <asp:ControlParameter ControlID="txtMerchantId" Name="MerchantId" DefaultValue="0"
                                        PropertyName="Text" Type="Int64" />
                                    <asp:ControlParameter ControlID="txtCarId" Name="CarId" DefaultValue="0"
                                        PropertyName="Text" Type="Int64" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <div class="clear">
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>--%>
        </div>
        <div id="tabs-2">
            <div class="toggle" runat="server" id="divCompletedQuoteDetails" visible="false">
                <div class="title opened" id="opened6">
                    <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label ID="Label10" runat="server" Text="" />Online
                        <asp:Label runat="server" ID="lblApplicationFormSummaryCaption" Text="<%$Resources:General,AppFromGGOnline%>" />
                    </h6>
                </div>
                <table cellpadding="0" cellspacing="0" width="100%" class="sTable">
                    <thead>
                        <tr>
                            <td>
                                <%=GetGlobalResourceObject("CarInsurance", "ReferenceNo")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("CarInsurance", "FullName")%>
                            </td>
                            
                            <td>
                                <%=GetGlobalResourceObject("General", "PaymentType")%>
                            </td>
                            
                            <td>
                                <%=GetGlobalResourceObject("General", "OrderRefNo")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("General", "PackageName")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("General", "AnnualPremium")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("NonGG", "CTPL")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("General", "DateTime")%>
                            </td>
                            
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="lblCQQuoteRefNo" />
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblCQFullName" />
                            </td>
                            
                            <td>
                                <asp:Label runat="server" ID="lblCQPaymentType" />
                            </td>
                            
                            <td>
                                <asp:Label runat="server" ID="lblCQOrderRefNo" />
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblCQPackageName" />
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblCQPremiumAmount" />
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblCQCTPLStatus" />
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblCQDateTime" />
                            </td>
                            
                        </tr>
                    </tbody>
                </table>
                <div class="clear">
                </div>
            </div>
            <asp:UpdatePanel ID="uplPremiumList" runat="server" UpdateMode="Conditional">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="grvPremiumList" EventName="RowCommand" />
                    <asp:AsyncPostBackTrigger ControlID="btnSubmitPremium" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <div class="toggle" runat="server" id="divPremiumList" visible="true">
                        <div class="title opened" id="opened4">
                            <img src="../../images/icons/dark/cart.png" alt="" class="titleIcon" />
                            <h6>
                                <asp:Label ID="Label3" runat="server" Text="<%$Resources:CarInsurance,NonGGPacakagesPremiumList%>" /></h6>
                            <asp:Label runat="server" ID="lblCarMoreDetailID" Text="-1" Visible="false" />
                            <asp:Label runat="server" ID="lblAppStatus" Text="" />
                            <asp:Label runat="server" ID="lblAppStatusMessage" Text="" />
                        </div>
                        <asp:GridView ID="grvPremiumList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            CellPadding="2" EmptyDataText="There are no data records to display." CssClass="sTable"
                            Width="100%" GridLines="None" DataSourceID="sqlDsPremiumList" DataKeyNames="BrokerPremiumId, CXBrokerProviderId, AgentId,Info1"
                            OnRowCommand="grvPremiumList_RowCommand" OnSelectedIndexChanged="grvPremiumList_SelectedIndexChanged">
                            <Columns>
                                <asp:BoundField DataField="BrokerPremiumId" Visible="false" HeaderText="BrokerPremiumId"
                                    SortExpression="BrokerPremiumId" />
                                <asp:BoundField DataField="ProviderCoverTypeId" Visible="false" HeaderText="ProviderCoverTypeId"
                                    SortExpression="ProviderCoverTypeId" />
                                <asp:BoundField DataField="AgentName" HeaderText="<%$Resources:General,Broker%>"
                                    SortExpression="AgentName" />
                                <asp:ImageField DataAlternateTextField="CompanyName" DataImageUrlField="LogoUrl"
                                    HeaderText="Logo">
                                </asp:ImageField>
                                <asp:BoundField DataField="CompanyName" HeaderText="<%$Resources:CarInsurance,CompanyName%>"
                                    SortExpression="CompanyName" Visible="false" />
                                <asp:BoundField DataField="Info1" HeaderText="<%$Resources:General,ReferenceNo%>"
                                    SortExpression="Info1" ItemStyle-BackColor="ActiveBorder" ItemStyle-Font-Bold="true"
                                    ItemStyle-ForeColor="Red" ItemStyle-Font-Size="Medium">
                                    <ItemStyle BackColor="ActiveBorder" Font-Bold="True" Font-Size="Medium" ForeColor="Red" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ProviderCoverTypeDesc" HeaderText="<%$Resources:CarInsurance,InsuranceType%>"
                                    SortExpression="ProviderCoverTypeDesc" />
                                <asp:BoundField DataField="Package" HeaderText="<%$Resources:General,PackageName%>"
                                    SortExpression="Package" Visible="false" />
                                <asp:BoundField DataField="WorkShopDesc" HeaderText="<%$Resources:CarInsurance,GarageType%>"
                                    SortExpression="WorkShopDesc" />
                                <asp:BoundField DataField="OwnDamage" DataFormatString="{0:#,0}" HeaderText="<%$Resources:CarInsurance,SumInsured%>"
                                    SortExpression="OwnDamage" />
                                <asp:BoundField DataField="DiscountPercentage" Visible="true" HeaderText="Discount (%)"
                                    SortExpression="DiscountPercentage" />
                                <asp:BoundField DataField="TotalCMI" DataFormatString="{0:#,0}" HeaderText="<%$Resources:CarInsurance,CTPL%>"
                                    SortExpression="TotalCMI" />
                                <asp:BoundField DataField="Premium" DataFormatString="{0:#,0}" HeaderText="<%$Resources:General,PremiumAmount%>"
                                    SortExpression="Premium" />
                                <asp:BoundField DataField="Info5" HeaderText="<%$Resources:CarInsuranceResultPage,FloodCover%>"
                                    SortExpression="Info5" />
                                <asp:BoundField DataField="NameDriverStatus" HeaderText="<%$Resources:NonGG,NamedDrivers%>"
                                    SortExpression="NameDriverStatus" />
                                <asp:BoundField DataField="SelectedStatus" HeaderText="<%$Resources:CarInsurance,SelectStatus%>"
                                    SortExpression="SelectedStatus" ItemStyle-Font-Bold="true">
                                    <ItemStyle Font-Bold="True" />
                                </asp:BoundField>
                                <asp:BoundField ItemStyle-Width="50px" DataField="ModifiedDate" DataFormatString="{0:dd/MMM/yyyy hh:mm:ss tt}"
                                    HeaderText="<%$Resources:General,DateTime%>" SortExpression="ModifiedDate" />
                                <asp:TemplateField HeaderText="<%$Resources:CarInsurance,Delete%>">
                                    <ItemTemplate>
                                        <asp:Button runat="server" ID="btnDelete" Text="Delete" CommandName="MyDelete" CommandArgument='<%#Eval("BrokerPremiumId")%>'
                                            OnClientClick="return DeletePremiumConfirm();" Width="50px" CssClass="blueB ml10" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowSelectButton="True" ButtonType="Button" ItemStyle-Width="50px"
                                    ControlStyle-Width="50px" SelectText="<%$Resources:General,Select%>" ControlStyle-CssClass="blueB ml10" />
                            </Columns>
                            <FooterStyle />
                            <PagerStyle />
                            <SelectedRowStyle />
                            <HeaderStyle />
                            <EditRowStyle />
                            <AlternatingRowStyle />
                            <RowStyle />
                        </asp:GridView>
                        <asp:SqlDataSource ID="sqlDsPremiumList" runat="server" ConnectionString="<%$ ConnectionStrings:GG_MCDBConnectionString %>"
                            SelectCommand="sprocMerchantBrokerPremiumSelectItemList" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="txtCarId" Name="CarId" DefaultValue="0"
                                    PropertyName="Text" Type="Int64" />
                                <asp:Parameter Name="ProductType" DefaultValue="CIN" DbType="String" />
                                <asp:ControlParameter ControlID="lblLangOption" Name="LangOption" DefaultValue="1"
                                    PropertyName="Text" Type="Int16" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:HyperLink ID="hplPremiumDownLoad" runat="server" Target="_blank" Text="<%$Resources:CarInsurance,DownloadNonGGPremium%>"
                            Visible="false"></asp:HyperLink>
                        <asp:Label runat="server" Visible="false" Text="" ID="lblSelectedRefNo" />
                        <div class="clear">
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div class="wizButtons">
                <span class="wNavButtons">
                    <asp:Button runat="server" ID="btnDownLoadQuotation" Text="DownLoad Quotation" OnClick="btnDownLoadQuotation_Click"
                        CssClass="blueB ml10" />
                </span>
                <div class="clear">
                </div>
            </div>
            <div class="toggle" id="Div2">
                <div class="title opened" id="opened6">
                    <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label runat="server" Text="<%$Resources:CarInsurance,Edit%>" ID="Label9" />
                    </h6>
                </div>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                        <div id="divEditDetail" runat="server" visible="true">
                            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                <tr>
                                    <td colspan="6">
                                        <asp:ValidationSummary runat="server" ValidationGroup="editdetail" ID="ValidationSummary1"
                                            ShowMessageBox="false" ShowSummary="true" ForeColor="Red" Font-Bold="true" HeaderText="Opps.. Please complete all (*) fields." />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "LicensePlate")%>
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEditLicensePlate" CausesValidation="false" runat="server" MaxLength="50"
                                            Width="200px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvLicensePlate" runat="server" ControlToValidate="txtEditLicensePlate"
                                            Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="editdetail"></asp:RequiredFieldValidator>
                                    </td>
                                    <td>
                                        <asp:Label runat="server" Text="<%$Resources:CarInsurance,CoverCommencementDate%>"
                                            ID="lblEditCoverCommencementDateCaption" />
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlEditCoverCommencementDate" Width="150px" runat="server" />
                                        Edited Date:
                                        <asp:Label runat="server" ID="lblEditCoverCommencementDate" Font-Bold="true" ForeColor="Red" />
                                        <asp:RequiredFieldValidator ID="rfvEditCoverCommencementDate" ValidationGroup="editdetail"
                                            runat="server" ControlToValidate="ddlEditCoverCommencementDate" ErrorMessage=""
                                            Text="*" /><br />
                                        <asp:Label runat="server" ID="lblEditCoverCommencementDateMessage" Font-Bold="true"
                                            ForeColor="Red" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <%=GetGlobalResourceObject("CarInsurance", "NamedDriver") %>
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlEditNamedDriver" Width="80px" CausesValidation="false" runat="server">
                                            <asp:ListItem Text="0" Value="0" />
                                            <asp:ListItem Text="1" Value="1" />
                                            <asp:ListItem Text="2" Value="2" />
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="rfvEditNameDriver" ValidationGroup="editdetail" runat="server"
                                            ControlToValidate="ddlEditNamedDriver" InitialValue="-1" ErrorMessage="" Text="*" />
                                    </td>
                                    <td>
                                        <%=GetGlobalResourceObject("CarInsurance", "NCB") %>
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlEditNCB" Width="80px" CausesValidation="false" runat="server">
                                            <asp:ListItem Text="0" Value="0" />
                                            <asp:ListItem Text="20" Value="20" />
                                            <asp:ListItem Text="30" Value="30" />
                                            <asp:ListItem Text="40" Value="40" />
                                            <asp:ListItem Text="50" Value="50" />
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="rfvEditNCB" ValidationGroup="editdetail" runat="server"
                                            ControlToValidate="ddlEditNCB" InitialValue="-1" ErrorMessage="" Text="*" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25">
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        <asp:Button ID="btnEditSubmit" OnClientClick="javascript:return SubmitEditDetailConfirm();"
                                            runat="server" Text="<%$Resources:General,Save%>" ValidationGroup="editdetail"
                                            OnClick="btnEditSubmit_Click" Width="150px" Height="30px" Font-Bold="true" CssClass="blueB ml10" />
                                        <asp:Label ID="lblEditDetailMessage" runat="server" ForeColor="Green" Font-Bold="true"></asp:Label>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="6">
                                        <asp:Label runat="server" Font-Bold="true" ForeColor="Red" ID="lblSendOrderConfirmationMessage" />
                                        <asp:Button ID="btnNewPremium" runat="server" Text="<%$Resources:General,NewQuotation%>"
                                            CausesValidation="false" Visible="false" OnClick="btnNewPremium_Click" CssClass="blueB ml10"
                                            OnClientClick="javascript:if(!ConfirmNew()) return false;" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <div id="div5" runat="server" visible="true">
                            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                <tr>
                                    <td colspan="6">
                                        <asp:ValidationSummary runat="server" ValidationGroup="sendquotation" ID="vsSendQuotes"
                                            ShowMessageBox="false" ShowSummary="true" ForeColor="Red" Font-Bold="true" HeaderText="Opps.. Please complete all (*) fields." />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="chkConfirmEmail" Font-Bold="true" Text="Send Quotation" runat="server"
                                            OnCheckedChanged="chkConfirmEmail_CheckedChanged" AutoPostBack="True" />
                                        <asp:TextBox ID="txtConfirmEmail" runat="server" Width="180px" />
                                        <asp:RequiredFieldValidator ID="rfvConfirmEmail" Enabled="true" Display="Dynamic"
                                            ValidationGroup="sendquotation" runat="server" ControlToValidate="txtConfirmEmail"
                                            ErrorMessage="*" Text="*" />
                                        <asp:RegularExpressionValidator ID="revConfirmEmail" Enabled="true" Display="Dynamic"
                                            ValidationGroup="sendquotation" runat="server" ControlToValidate="txtConfirmEmail"
                                            ErrorMessage="*" Text="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
                                    </td>
                                    <td>
                                        <asp:CheckBox runat="server" ID="chkIsEN" Text="&nbsp;English" Font-Bold="true" ForeColor="Red" />
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnSendQuotation" runat="server" Text="<%$Resources:General,ConfirmEmailAndSendQuotation%>"
                                            Visible="true" OnClick="btnSendQuotation_Click" CssClass="blueB ml10" OnClientClick="return SendQuotationConfirm();" />
                                    </td>
                                    <td style="width: 150px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="6">
                                        <asp:Label runat="server" Font-Bold="true" ForeColor="Red" ID="lblSendQuotationMessage" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <div class="toggle">
                <div class="title opened" id="opened2">
                    <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label runat="server" Text="<%$Resources:CarInsurance,NonGGPackages%>" ID="Label8" />
                        <asp:Label runat="server" Text="" ID="lblRenewalStatusMessage" />
                    </h6>
                </div>
                <div class="widgets">
                    <div class="form">
                        <fieldset class="step">
                            <asp:UpdatePanel ID="uplCXBrokerPremium" runat="server">
                                <ContentTemplate>
                                    <div style="display: none;">
                                        <asp:TextBox runat="server" ID="txtPremiumId" Text="0"></asp:TextBox>
                                    </div>
                                    <div>
                                        <asp:ValidationSummary runat="server" ValidationGroup="premium" ID="valPremium" ShowMessageBox="false"
                                            ShowSummary="true" ForeColor="Red" Font-Bold="true" HeaderText="Opps.. Please complete all (*) fields." />
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <div id="divCXBrokerPremium" runat="server">
                                        <div class="form">
                                            <div id="divOne" class="oneTwo">
                                                <div class="toggle">
                                                    <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                                        <tr>
                                                            <td width="180" height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "CompanyName")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlBrokerProvider" CausesValidation="false" runat="server"
                                                                    OnSelectedIndexChanged="ddlBrokerProvider_SelectedIndexChanged" AutoPostBack="True">
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvBrokerProvider" ValidationGroup="premium" runat="server"
                                                                    ControlToValidate="ddlBrokerProvider" InitialValue="-1" ErrorMessage="" Text="*" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "InsuranceType")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlBrokerCoverType" runat="server" OnSelectedIndexChanged="ddlBrokerCoverType_SelectedIndexChanged"
                                                                    AutoPostBack="True" CausesValidation="true">
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvBrokerCoverType" ValidationGroup="premium" runat="server"
                                                                    ControlToValidate="ddlBrokerCoverType" InitialValue="-1" ErrorMessage="" Text="*" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "GarageType")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlGarageType" runat="server" CausesValidation="false" AutoPostBack="true"
                                                                    OnSelectedIndexChanged="ddlGarageType_SelectedIndexChanged">
                                                                    <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>" />
                                                                    <asp:ListItem Value="1" Text="<%$ Resources:CarInsurance,Garage_Authorized%>" />
                                                                    <asp:ListItem Value="2" Text="<%$ Resources:CarInsurance,Garage_Dealer%>" />
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvWorkShop" runat="server" ControlToValidate="ddlGarageType"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                GG.COM Discount
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <table cellpadding="10">
                                                                    <tr>
                                                                        <td>
                                                                            <asp:DropDownList CausesValidation="true" runat="server" ID="ddlDiscountPercentage"
                                                                                AutoPostBack="True" OnSelectedIndexChanged="ddlDiscountPercentage_SelectedIndexChanged">
                                                                                <asp:ListItem Text="0 %" Value="0" />
                                                                                
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                        <td>
                                                                            <asp:Label runat="server" Font-Bold="true" ID="lblDiscountAmount" Text="0" />
                                                                            <asp:RequiredFieldValidator ID="rfvDiscountPercentage" runat="server" ControlToValidate="ddlDiscountPercentage"
                                                                                ErrorMessage="*" Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                                        </td>
                                                                        <td>
                                                                            Teledirect's Employee?
                                                                        </td>
                                                                        <td>
                                                                            <asp:CheckBox ID="chkCompanyStaff" Checked="false" runat="server" OnCheckedChanged="chkCompanyStaff_CheckedChanged"
                                                                                AutoPostBack="true" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "NetPremium")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblNetPremium" Font-Bold="true" runat="server" Width="120px" />
                                                                <asp:TextBox ID="txtNetPremium" CausesValidation="false" ReadOnly="true" Visible="false"
                                                                    runat="server" MaxLength="20" Width="120px"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="rfvNetPremium" runat="server" ControlToValidate="txtNetPremium" ErrorMessage="Premium."
                                                                        Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                                            ID="revNetPremium" runat="server" ControlToValidate="txtNetPremium" ValidationGroup="premium"
                                                                            ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "Duty")%>
                                                                (0.4%)
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblTax" Font-Bold="true" runat="server" Width="200px" />
                                                                <asp:TextBox ID="txtTax" CausesValidation="false" runat="server" ReadOnly="true"
                                                                    Visible="false" Text="" MaxLength="20" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvTax" runat="server" ControlToValidate="txtTax"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "VAT")%>
                                                                (7%)
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblVAT" runat="server" Font-Bold="true" MaxLength="20" Width="200px" />
                                                                <asp:TextBox ID="txtVAT" runat="server" ReadOnly="true" Visible="false" Text="" MaxLength="20"
                                                                    Width="200px"></asp:TextBox><asp:RequiredFieldValidator ID="rfvVAT" runat="server"
                                                                        ControlToValidate="txtVAT" Display="Dynamic" ErrorMessage="Package" Text="*"
                                                                        ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "GrossPremium")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtGrossPremium" runat="server" MaxLength="12" Width="120px" AutoPostBack="True"
                                                                    CausesValidation="true" OnTextChanged="txtGrossPremium_TextChanged"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvGrossPremium" runat="server" ControlToValidate="txtGrossPremium"
                                                                    ErrorMessage="" Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revGrossPremium" runat="server" ControlToValidate="txtGrossPremium"
                                                                    ValidationGroup="premium" ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "VMIGrossPremiumAfterDiscount")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblAnnualPremium" runat="server" Width="120px" />
                                                                <asp:TextBox ID="txtAnnualPremium" CausesValidation="false" ReadOnly="true" runat="server"
                                                                    MaxLength="20" Width="120px" Visible="false"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="rfvAnnualPremium" runat="server" ControlToValidate="txtAnnualPremium" ErrorMessage="Premium."
                                                                        Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                                            ID="revAnnualPremium" runat="server" ControlToValidate="txtAnnualPremium" ValidationGroup="premium"
                                                                            ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "CTPLCMIGP")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlVehicleBodyType" CausesValidation="true" Enabled="true"
                                                                    OnSelectedIndexChanged="ddlVehicleBodyType_SelectedIndexChanged" runat="server"
                                                                    AutoPostBack="true">
                                                                    <asp:ListItem Text="<%$Resources:CarInsurance,Sedan%>" Value="1" Selected="True" />
                                                                    <asp:ListItem Text="<%$Resources:CarInsurance,Pickup%>" Value="2" />
                                                                    <asp:ListItem Text="<%$Resources:General,Others%>" Value="99" />
                                                                </asp:DropDownList>
                                                                <asp:TextBox ID="txtCTPL" CausesValidation="true" ReadOnly="false" runat="server"
                                                                    Text="645.21" MaxLength="20" Width="50px" AutoPostBack="True" OnTextChanged="txtCTPL_TextChanged"></asp:TextBox>
                                                                <asp:CheckBox ID="chkCTPL" CausesValidation="false" runat="server" Checked="true"
                                                                    AutoPostBack="True" OnCheckedChanged="chkCTPL_CheckedChanged" />
                                                                <asp:RequiredFieldValidator ID="rfvCTPL" runat="server" ControlToValidate="txtCTPL"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                                <asp:RegularExpressionValidator ID="revCTPL" runat="server" ControlToValidate="txtCTPL"
                                                                    ValidationGroup="premium" ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <b style="color: Red;">Tesco</b>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtTescoAmount" CausesValidation="false" runat="server" Text="0"
                                                                    ReadOnly="true" Width="50px" ForeColor="Red" Font-Bold="true"></asp:TextBox>
                                                                <asp:Label ID="lblTesco" runat="server" ForeColor="Red" Font-Bold="true" Visible="false"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "TotalGPNoDiscount")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtFinalAnnualPremiumNoDisc" CausesValidation="false" runat="server"
                                                                    MaxLength="20" Width="120px" Visible="true" ReadOnly="true" Font-Bold="true"
                                                                    Font-Size="Large" AutoPostBack="True" OnTextChanged="txtFinalAnnualPremiumNoDisc_TextChanged"></asp:TextBox>
                                                                <asp:CheckBox ID="chkChangePremium" CausesValidation="false" runat="server" Checked="false"
                                                                    AutoPostBack="True" OnCheckedChanged="chkChangePremium_CheckedChanged" Text=" Edit" />
                                                                <asp:RequiredFieldValidator ID="rfvFinalAnnualPremiumNoDisc" runat="server" ControlToValidate="txtFinalAnnualPremiumNoDisc"
                                                                    ErrorMessage="*" Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                                        ID="revFinalAnnualPremiumNoDisc" runat="server" ControlToValidate="txtFinalAnnualPremiumNoDisc"
                                                                        ValidationGroup="premium" ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                                <div style="display: none;">
                                                                    <asp:Label ID="lblB4EditFinalAnnualPremiumNoDisc" runat="server" Text="0"></asp:Label>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "TotalGPWithDiscount")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtFinalAnnualPremium" CausesValidation="false" runat="server" MaxLength="20"
                                                                    Width="120px" Visible="true" ReadOnly="true" Font-Bold="true" Font-Size="Large"
                                                                    AutoPostBack="True" OnTextChanged="txtFinalAnnualPremium_TextChanged"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="rfvFinalAnnualPremium" runat="server" ControlToValidate="txtFinalAnnualPremium"
                                                                        ErrorMessage="*" Text="*" Display="Dynamic" ValidationGroup="premium"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                                            ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtFinalAnnualPremium"
                                                                            ValidationGroup="premium" ErrorMessage="**" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                                <div style="display: none;">
                                                                    <asp:Label ID="lblB4EditFinalAnnualPremium" runat="server" Text="0"></asp:Label>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "PaymentOption")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlPaymentOption" runat="server" Width="200px">
                                                                    <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                                                    <asp:ListItem Value="IP" Text="<%$ Resources:CarInsurance,Installment%>"></asp:ListItem>
                                                                    <asp:ListItem Value="FP" Text="<%$ Resources:CarInsurance,AnnualPayment%>"></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvPaymentOption" ControlToValidate="ddlPaymentOption"
                                                                    ErrorMessage="" ValidationGroup="premium" InitialValue="-1" Text="*" runat="server"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <!-- Monthly Installment -- start -->
                                                        <tr>
                                                            <td colspan="3">
                                                                <h6>
                                                                    <%=GetGlobalResourceObject("CarInsurance", "MonthlyInstallment")%></h6>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "GGCOMDiscount")%>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlGGDiscount" CausesValidation="false" runat="server" Enabled="false">
                                                                </asp:DropDownList>
                                                                &nbsp;&nbsp;
                                                                <asp:Label ID="lblNoDiscount" runat="server" Visible="false"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <%=GetGlobalResourceObject("CarInsurance", "CreditCardAllowed")%>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblCreditCardAllowed" runat="server" Visible="false"></asp:Label>
                                                                <asp:DropDownList ID="ddlCreditCard" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCreditCard_SelectedIndexChanged">
                                                                    <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>" />
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "NoofInstallments")%>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlNoofInstallments" CausesValidation="false" runat="server"
                                                                    OnSelectedIndexChanged="ddlNoofInstallments_SelectedIndexChanged" AutoPostBack="True">
                                                                </asp:DropDownList>
                                                                &nbsp;&nbsp;
                                                                <asp:Label ID="lblCHINSMessage" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <%=GetGlobalResourceObject("CarInsurance", "Interest")%>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblInterest" runat="server"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <strong>
                                                                    <%=GetGlobalResourceObject("NonGG", "TotalGPNoDiscount")%></strong>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblTotalGrossPremiumWOD" runat="server"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <asp:Label ID="lblTitleFirstInstallWOD" runat="server"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblFirstInstallmentWODdesc" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblFirstInstallmentWOD" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <asp:Label ID="lblTitleLastInstallWOD" runat="server"></asp:Label>&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblTitleLastInstallWODDesc" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblLastInstallmentWOD" runat="server" ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <strong>
                                                                    <%=GetGlobalResourceObject("NonGG", "TotalGPWithDiscount")%></strong>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblTotalGrossPremiumWD" runat="server"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <asp:Label ID="lblTitleFirstInstallWD" runat="server"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblFirstInstallmentWDdesc" runat="server" ForeColor="green"></asp:Label>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblFirstInstallmentWD" runat="server" ForeColor="green"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <asp:Label ID="lblTitleLastInstallWD" runat="server"></asp:Label>&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblTitleLastInstallWDDesc" runat="server" ForeColor="green"></asp:Label>
                                                            </td>
                                                            <td width="5">
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblLastInstallmentWD" runat="server" ForeColor="green"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <!-- Monthly Installment -- end -->
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("General", "Comments")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtPremiumChangeComments" CausesValidation="false" runat="server"
                                                                    MaxLength="50" Width="220px" Visible="true" TextMode="MultiLine" Rows="3" Columns="50" />
                                                                <asp:RequiredFieldValidator ID="rfvPremiumChangeComments" Enabled="false" runat="server"
                                                                    ControlToValidate="txtPremiumChangeComments" ErrorMessage="*" Text="*" Display="Dynamic"
                                                                    ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("General", "Agent")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList runat="server" ID="ddlAgentbyAdmin" Width="250px">
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("General", "Status")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="chkSelected" runat="server" Text="<%$Resources:General,SelectThisPremium%>" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnNewPremiumTwo" runat="server" Text="<%$Resources:General,NewQuotation%>"
                                                                    CausesValidation="false" Visible="true" OnClick="btnNewPremium_Click" CssClass="blueB ml10"
                                                                    OnClientClick="return ConfirmNew();" />
                                                            </td>
                                                            <td>
                                                                &nbsp;
                                                            </td>
                                                            <td>
                                                                <asp:Button ID="btnSubmitPremium" OnClientClick="return SubmitPremiumConfirm();"
                                                                    runat="server" Text="<%$Resources:CarInsurance,SubmitPremium%>" ValidationGroup="premium"
                                                                    OnClick="btnSubmitPremium_Click" Width="130px" Height="30px" Font-Bold="true"
                                                                    CssClass="blueB ml10" />
                                                                <asp:Label ID="lblTESCO200Two" runat="server" Font-Bold="true" ForeColor="Green"
                                                                    Font-Size="Large" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <asp:Label ID="lblPremiumMessage" runat="server" ForeColor="Green" Font-Bold="true"></asp:Label>
                                                                <asp:Label ID="lblPremiumError" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </div>
                                            <div id="divTwo" class="oneTwo">
                                                <div class="toggle">
                                                    <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                                        <tr>
                                                            <td width="200" height="25">
                                                                <%=GetGlobalResourceObject("General", "ReferenceNo")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="lblQRefNo" runat="server" Font-Bold="true" Font-Size="Medium" Text="" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "LicensePlate")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:Label runat="server" ID="lblEditLicensePlate" />
                                                                <asp:RequiredFieldValidator ID="rfvEditLicensePlate" runat="server" ControlToValidate="txtEditLicensePlate"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25" colspan="3">
                                                                <%=GetGlobalResourceObject("CarInsurance", "AccessaryAndModificationAmount")%>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25" colspan="3">
                                                                <asp:TextBox ID="txtAccModCost" CausesValidation="false" runat="server" Text="0"
                                                                    MaxLength="50" Width="500px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvAccModCost" runat="server" ControlToValidate="txtAccModCost"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "TPBIP")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtTPBIP" CausesValidation="false" runat="server" Text="1,000,000"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvTPBIP" runat="server" ControlToValidate="txtTPBIP"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "TPBIA")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtTPBIA" CausesValidation="false" runat="server" Text="10,000,000"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTPBIA"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "TPPD")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtTPPD" CausesValidation="false" runat="server" Text="5,000,000"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvTPPD" runat="server" ControlToValidate="txtTPPD"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "OwnDamage")%><br />
                                                                /
                                                                <asp:Label runat="server" Text="<%$Resources:CarInsurance,SumInsured%>" ID="Label13" />
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtOwnDamage" CausesValidation="false" runat="server" Text="20,000"
                                                                    MaxLength="20" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvOwnDamage" runat="server" ControlToValidate="txtOwnDamage"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "FireTheft")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtFireTheft" CausesValidation="false" runat="server" Text="2,200,000"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvFireTheft" runat="server" ControlToValidate="txtFireTheft"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "FloodCover")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtFloodCoverAmount" CausesValidation="false" runat="server" Text="0"
                                                                    MaxLength="20" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvFloodCoverAmount" runat="server" ControlToValidate="txtFloodCoverAmount"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "DEC")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtDeductible" CausesValidation="false" runat="server" MaxLength="50"
                                                                    Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvDeductible" runat="server" ControlToValidate="txtDeductible"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                                <asp:CustomValidator ControlToValidate="txtDeductible" Display="Dynamic" ValidationGroup="premium"
                                                                    ID="csvDeductibleValid" runat="server" ErrorMessage="<%$Resources:General,DeductableValid%>"
                                                                    Text="" OnServerValidate="csvDeductibleValid_ServerValidate"></asp:CustomValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "PA")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtPA" CausesValidation="false" runat="server" Text="200,000(12)"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvPA" runat="server" ControlToValidate="txtPA" Display="Dynamic"
                                                                    ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "MED")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtMED" CausesValidation="false" runat="server" Text="200,000(12)"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvMED" runat="server" ControlToValidate="txtPA"
                                                                    Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "BailBond")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtBailBond" CausesValidation="false" runat="server" Text="250,000"
                                                                    MaxLength="50" Width="200px"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvBailBond" runat="server" ControlToValidate="txtPA"
                                                                    Display="Dynamic" ErrorMessage="Package" Text="*" ValidationGroup="premium"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="25">
                                                                <%=GetGlobalResourceObject("NonGG", "NamedDrivers")%>
                                                            </td>
                                                            <td>
                                                                :
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="chkNamedDriver" Checked="false" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnGoToApplication" runat="server" Text="<%$Resources:General,NonGGPackageApplication%>"
                                                                    Visible="true" CssClass="blueB ml10" OnClick="btnGoToApplication_Click" />
                                                            </td>
                                                            <td>
                                                                &nbsp;
                                                            </td>
                                                            <td>
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </fieldset>
                    </div>
                </div>
            </div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <div style="display: none">
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtCXCRMId" />
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtCarResultId" />
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtServerPath" />
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId" />
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtCallMeId" />
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtCallBackCount" />
                        <asp:TextBox runat="server" ID="txtCallStatusId" Text="0"></asp:TextBox>
                        <asp:TextBox runat="server" ID="txtContactNo" Text="0"></asp:TextBox>
                        <asp:TextBox ID="txtUserTypeId" runat="server" Text="400"></asp:TextBox>
                        <asp:TextBox ID="txtGG" runat="server" Text="PROVIDER"></asp:TextBox>
                        <asp:TextBox ID="txtNoofPayment" runat="server" Text="0"></asp:TextBox>
                        <asp:TextBox ID="txtCarId" runat="server" Text="0"></asp:TextBox>
                        <asp:TextBox ID="txtCEId" runat="server" Text="0"></asp:TextBox>
                        <asp:TextBox ID="txtCarPolicyId" runat="server" Text="0"></asp:TextBox>
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtMerchantId" />
                        <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
                            ID="lblLangOption"></asp:Label>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>

    <script type="text/javascript">
        function OpenPremiumDownload(refid) {
            document.getElementById('<%= txtCarId.ClientID%>').value = refid;

            var winl = (screen.width - 800) / 2;
            var wint = (screen.height - 500) / 2;
            var settings = 'height=500,';
            settings += 'width=800,';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += 'scrollbars=yes,';
            settings += 'resizable=No';
            window.open('PremiumDownload.aspx?carid=' + refid, 'NEWWIN', settings);
        }

        var intTimer = setInterval("StartTimer()", 1000);

        function StartTimer() {
            var txtMin = document.getElementById('<%=txtMinute.ClientID%>');
            var txtSecond = document.getElementById('<%=txtSecond.ClientID%>');

            var intMin = parseInt(txtMin.value);
            var intSecond = parseInt(txtSecond.value) + 1;

            var strMin = '';
            var strSecond = '';
            
            if (intSecond == 60) {
                intSecond = 0;
                intMin = intMin + 1
            }

            if (intMin == 60 && intSecond == 1) {
                alert("Call duration is now over 60 minutes.");
               
            }

            txtMin.value = intMin.toString();
            txtSecond.value = intSecond.toString();

            if (intMin > 9) {
                strMin = intMin.toString();
            }
            else {
                strMin = "0" + intMin.toString();
            }

            if (intSecond > 9) {
                strSecond = intSecond.toString();
            }
            else {
                strSecond = "0" + intSecond.toString();
            }

            var lblCallTimer = document.getElementById('<%=lblCallDurationTimer.ClientID%>');
            if (lblCallTimer != null) {
                lblCallTimer.innerHTML = strMin + " : " + strSecond;
            }
        }

        function GoBackConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('backbutton')) {
                _retVal = window.confirm('<%=GetGlobalResourceObject("CarInsurance", "ConfirmBack")%>?');
            }

            

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }

        function SendQuotationConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('sendquotation')) {
                _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }

            

            return _retVal;
        }

        function SubmitCustomerNoteConfirm() {
            var _retVal = false;
            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            return _retVal;
        }

        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('callstatus')) {
                _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }

           

            return _retVal;
        }

        function SubmitEditDetailConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('editdetail')) {
                _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }

            

            return _retVal;
        }

        function SendQuotationConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('sendquotation')) {
                _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }

            

            return _retVal;
        }

        function SubmitPremiumConfirm() {
            var _retVal = false;
            var txtNoofRecord = document.getElementById('<%=txtNoofPayment.ClientID%>');
            if (Page_ClientValidate('premium')) {
                if (txtNoofRecord == 0) {
                    _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
                }
                else {
                    _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmitwothPayDelete")%>');
                }
            }

            

            return _retVal;
        }

        function SubmitScriptConfirm() {
            var _retVal = false;
            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');

            

            return _retVal;
        }

        function NextConfirm() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmNext")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }

        function ConfirmNew() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "NewQuotationConfirm")%>');

            return _retVal;
        }

        function GoBackConfirm() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmtoGoBack")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            

            return _retVal;
        }

        function DeletePremiumConfirm() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("CarInsurance", "ConfirmDeleteNonGGPremium")%>');

            

            return _retVal;
        }

        function ConfirmREQuote() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmReRunQuoteMessage")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }

        function ConfirmNewQuote() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("General", "ConfirmRunNewQuoteMessage")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }

        function PremiumDownloadClick() {
            //window.onbeforeunload = null;
        }

        function ConfirmRenewQuote() {
            var _retVal = false;

            _retVal = confirm('Are you sure to RENEW QUOTE?');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }

        var _ddlDiscountPercentageEnableStatus = false;

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);
        var postBackElement;
        function InitializeRequest(sender, args) {
            if (prm.get_isInAsyncPostBack())
                args.set_cancel(true);
            postBackElement = args.get_postBackElement();
            OnOffUpdateProgress(true);
        }

        function OnOffUpdateProgress(onOff) {

            if ($get('<%=btnSubmitPremium.ClientID%>') != null) {
                $get('<%=btnSubmitPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnSubmitPremium.ClientID%>') != null) {
                $get('<%=btnSubmitPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnSubmitPremium.ClientID%>') != null) {
                $get('<%=btnSubmitPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=chkCTPL.ClientID%>') != null) {
                $get('<%=chkCTPL.ClientID%>').disabled = onOff;
            }

            if ($get('<%=txtGrossPremium.ClientID%>') != null) {
                $get('<%=txtGrossPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=txtFinalAnnualPremium.ClientID%>') != null) {
                $get('<%=txtFinalAnnualPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlDiscountPercentage.ClientID%>') != null) {
                _ddlDiscountPercentageEnableStatus = $get('<%=ddlDiscountPercentage.ClientID%>').disabled;
                $get('<%=ddlDiscountPercentage.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlBrokerCoverType.ClientID%>') != null) {
                $get('<%=ddlBrokerCoverType.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlBrokerProvider.ClientID%>') != null) {
                $get('<%=ddlBrokerProvider.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlGarageType.ClientID%>') != null) {
                $get('<%=ddlGarageType.ClientID%>').disabled = onOff;
            }

            if ($get('<%=grvPremiumList.ClientID%>') != null) {
                $get('<%=grvPremiumList.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnNewPremium.ClientID%>') != null) {
                $get('<%=btnNewPremium.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlVehicleBodyType.ClientID%>') != null) {
                $get('<%=ddlVehicleBodyType.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnNewPremiumTwo.ClientID%>') != null) {
                $get('<%=btnNewPremiumTwo.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnGoToApplication.ClientID%>') != null) {
                $get('<%=btnGoToApplication.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnEditSubmit.ClientID%>') != null) {
                $get('<%=btnEditSubmit.ClientID%>').disabled = onOff;
            }

            if ($get('<%=lblPremiumMessage.ClientID%>') != null) {
                if (onOff) {
                    $get('<%=lblPremiumMessage.ClientID%>').innerHTML = '<span style=\'color:red;\'>Processing... please wait</span>';
                }
            }

            if ($get('<%=chkCompanyStaff.ClientID%>') != null) {
                $get('<%=chkCompanyStaff.ClientID%>').disabled = onOff;
            }

            if ($get('<%=lblSendQuotationMessage.ClientID%>') != null) {
                if (onOff) {
                    $get('<%=lblSendQuotationMessage.ClientID%>').innerHTML = '<span style=\'color:red;\'>Processing... please wait</span>';
                }
            }
        }

        function EndRequest(sender, args) {
            OnOffUpdateProgress(false);
            if ($get('<%=ddlDiscountPercentage.ClientID%>') != null) {
                $get('<%=ddlDiscountPercentage.ClientID%>').disabled = _ddlDiscountPercentageEnableStatus;
            }
        }

        window.onbeforeunload = function() {
            return 'ARE YOU SURE?';
        }


        $(document).ready(function() {
            $(".iframe").colorbox({
                iframe: true,
                width: "90%",
                height: "95%"
            });
        });

        // Tabs
        $(function() {
            $("#tabs").tabs();
        });

        function ontabclick(tabval) {
            $('#<%=hidLastTab.ClientID%>').val(tabval);
            if (tabval == "1") {
                document.getElementById("tabs-1").style.display = "";
                document.getElementById("tabs-2").style.display = "none";
            }
            else if (tabval == "2") {
                document.getElementById("tabs-1").style.display = "none";
                document.getElementById("tabs-2").style.display = "";
            }
            else if (tabval == "3") {
                document.getElementById("tabs-1").style.display = "none";
                document.getElementById("tabs-2").style.display = "";
                $('#<%=btnGoToApplication.ClientID%>').click();
            }
        }

        window.onload = function() {
            if ($('#<%=hidLastTab.ClientID%>').val() != '') {
                var tabval = $('#<%=hidLastTab.ClientID%>').val();
                ontabclick(tabval);
            }
        };

        $(document).ready(function() {
            if ($('#<%=hidLastTab.ClientID%>').val() != '') {
                $('#tabs').tabs('select', $('#<%=hidLastTab.ClientID%>').val());
            }
        });
       
       
    </script>

</asp:Content>
